#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
    pid_t ret = fork();
    if (ret < 0) {
        perror("fork");
        return 1;
    }
    else if (ret == 0) {
        while (1) {
            printf("I am child process.....:PID:%d, ret:%d\n", getpid(), ret);
            sleep(1);
        }
    }
    else {
        while (1) {
            printf("I am father process.....:PID:%d, ret:%d\n", getpid(), ret);
            sleep(1);
        }
    }
    return 0;
}